{"openapi":"3.1.0","info":{"title":"Selah Bible API","version":"1.0.0","summary":"Free, open Bible data — Scripture, Strong's, commentary, cross-references, people, places, and more.","description":"Public REST API for biblical text and study data.\n\n**Base URL:** `https://myselahh.com`\n\n**Auth:** every `/api/v1/*` endpoint except `/health` and `/ping` requires an API key. Pass it any of three ways — `Authorization: Bearer <key>`, `X-API-Key: <key>`, or `?key=<key>`. Get a free keypair at `/register`. (Requests originating from the Selah site itself are exempt.)\n\n**Two key types** (both issued per account): a **secret key** (`bapi_sk_…`) for servers — full access, keep it private; and a **publishable key** (`bapi_pk_…`) safe to embed in a browser/widget — it only works from the domains you allow-list in your dashboard (a request from any other origin, or with no `Origin`/`Referer`, is rejected with `403 ORIGIN_NOT_ALLOWED`).\n\n**Response envelope:** successful responses are `{ data, meta, pagination? }`; errors are `{ data: null, meta: {}, errors: [{ code, message, docs }] }`.\n\n**Rate limits:** a per-minute ceiling and a rolling per-window quota apply per key; `429` is returned when either is exceeded. `RateLimit-*` headers report remaining quota.\n\n**References** accept either a slug or a display name, URL-encoded — e.g. `John 3:16`, `John%203:16`, `Romans 8:1-39`, or `Genesis 1`.\n\n**Translations available:** WEB, KJV, KJVA, AKJV (all public-domain).","contact":{"name":"Selah","url":"https://myselahh.com/docs"},"license":{"name":"Public-domain biblical texts","url":"https://myselahh.com/docs"}},"servers":[{"url":"https://myselahh.com","description":"Production"}],"security":[{"bearerKey":[]},{"apiKeyHeader":[]},{"apiKeyQuery":[]}],"tags":[{"name":"System","description":"Liveness — no API key required."},{"name":"Scripture","description":"Books, chapters, verses, and passages."},{"name":"Search","description":"Full-text search across Scripture."},{"name":"Study","description":"Commentary, cross-references, Strong's, dictionary, concordance."},{"name":"Topics","description":"Topical index — themes to verse lists."},{"name":"People, Places & Things","description":"Biblical entities and their relationships."},{"name":"Daily","description":"Verse of the Day and Person of the Day."},{"name":"Widget","description":"Data feeds for the embeddable tooltip widget."}],"paths":{"/api/v1/health":{"get":{"tags":["System"],"summary":"Service liveness + book count","description":"Public. Returns `{ status, version, bookCount, totalBookRows }` — `bookCount` is the 66-book protestant canon (matching GET /api/v1/books); `totalBookRows` includes the 14 apocrypha rows. No API key required.","security":[],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/health'"}]}},"/api/v1/ping":{"get":{"tags":["System"],"summary":"Minimal liveness check","security":[],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/ping'"}]}},"/api/v1/passages/{reference}":{"get":{"tags":["Scripture"],"summary":"Fetch a passage by reference (verse, range, or whole chapter)","description":"Resolves a free-text reference. Supports single verses (`John 3:16`), ranges (`Romans 8:1-39`, max 200 verses), and whole chapters (`Genesis 1`). Use `format` for plain text/markdown/html and `translations` for a parallel response.","parameters":[{"name":"reference","in":"path","required":true,"description":"URL-encoded reference, e.g. `John%203:16`, `Romans%208:1-39`, `Genesis%201`.","schema":{"type":"string"},"example":"John%203:16"},{"name":"translation","in":"query","description":"Single translation (default WEB).","schema":{"type":"string","enum":["WEB","KJV","KJVA","AKJV"],"default":"WEB"},"example":"WEB"},{"name":"translations","in":"query","description":"Comma-separated list for a multi-translation response, e.g. `KJV,WEB`.","schema":{"type":"string"},"example":"KJV,WEB"},{"name":"format","in":"query","description":"Output format (single-translation only).","schema":{"type":"string","enum":["json","text","markdown","html"],"default":"json"},"example":"json"},{"name":"strongs","in":"query","description":"Include Strong's concordance data per word (KJV only).","schema":{"type":"boolean","default":false},"example":true}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Invalid request (bad reference, param, or range).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/passages/John%203:16?translation=KJV&strongs=true' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/verses/{book}/{chapter}/{verse}":{"get":{"tags":["Scripture"],"summary":"Fetch a single verse","description":"Path uses the book **slug** (e.g. `1-corinthians`). For a verse range, use `/api/v1/passages/{reference}`.","parameters":[{"name":"book","in":"path","required":true,"description":"Book slug from `/api/v1/books`, e.g. `john`, `1-corinthians`.","schema":{"type":"string"},"example":"john"},{"name":"chapter","in":"path","required":true,"description":"Chapter number.","schema":{"type":"string"},"example":"3"},{"name":"verse","in":"path","required":true,"description":"Verse number.","schema":{"type":"string"},"example":"16"},{"name":"translation","in":"query","description":"Single translation (default KJV).","schema":{"type":"string","enum":["WEB","KJV","KJVA","AKJV"],"default":"KJV"},"example":"KJV"},{"name":"translations","in":"query","description":"Comma-separated list for a multi-translation response, e.g. `KJV,WEB`.","schema":{"type":"string"},"example":"KJV,WEB"},{"name":"strongs","in":"query","description":"Include Strong's concordance data per word (KJV only).","schema":{"type":"boolean","default":false},"example":true}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Invalid request (bad reference, param, or range).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/verses/john/3/16?translations=KJV,WEB' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/books":{"get":{"tags":["Scripture"],"summary":"List Bible books with metadata","description":"Filterable by testament, canon, and genre. `canon` defaults to `protestant` (66 books); `canon=all` includes the 14 Apocrypha rows.","parameters":[{"name":"testament","in":"query","description":"Filter by testament.","schema":{"type":"string","enum":["OT","NT","Apocrypha"]},"example":"NT"},{"name":"canon","in":"query","description":"Canon filter (default protestant). Use `all` for every row.","schema":{"type":"string","default":"protestant"},"example":"protestant"},{"name":"genre","in":"query","description":"Filter by literary genre.","schema":{"type":"string"},"example":"gospel"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/books?testament=NT' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/books/{book}":{"get":{"tags":["Scripture"],"summary":"Single book metadata","parameters":[{"name":"book","in":"path","required":true,"description":"Book slug.","schema":{"type":"string"},"example":"john"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/books/john' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/books/{book}/chapters/{chapter}":{"get":{"tags":["Scripture"],"summary":"All verses in a chapter","parameters":[{"name":"book","in":"path","required":true,"description":"Book slug.","schema":{"type":"string"},"example":"john"},{"name":"chapter","in":"path","required":true,"description":"Chapter number.","schema":{"type":"string"},"example":"3"},{"name":"translation","in":"query","description":"Single translation (default KJV).","schema":{"type":"string","enum":["WEB","KJV","KJVA","AKJV"],"default":"KJV"},"example":"KJV"},{"name":"format","in":"query","description":"Output format.","schema":{"type":"string","enum":["json","text","markdown","html"],"default":"json"},"example":"json"},{"name":"include_verse_numbers","in":"query","description":"Include verse numbers in text/markdown/html output.","schema":{"type":"boolean","default":true},"example":true}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Invalid request (bad reference, param, or range).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/books/john/chapters/3' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/translations":{"get":{"tags":["Scripture"],"summary":"List available translations","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/translations' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/interlinear/{reference}":{"get":{"tags":["Scripture"],"summary":"Word-for-word Hebrew/Greek interlinear","description":"Each English word aligned to its original-language word, enriched from the Strong's lexicon (KJV basis).","parameters":[{"name":"reference","in":"path","required":true,"description":"URL-encoded reference.","schema":{"type":"string"},"example":"John%203:16"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Invalid request (bad reference, param, or range).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/interlinear/John%203:16' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/preview":{"get":{"tags":["Scripture"],"summary":"Lightweight single-verse preview","description":"Minimal payload used by the tooltip widget.","parameters":[{"name":"ref","in":"query","description":"URL-encoded reference.","schema":{"type":"string"},"example":"John%203:16"},{"name":"translation","in":"query","description":"Translation (default KJV).","schema":{"type":"string","enum":["WEB","KJV","KJVA","AKJV"],"default":"KJV"},"example":"KJV"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Invalid request (bad reference, param, or range).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/preview?ref=John%203:16' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/commentary":{"get":{"tags":["Study"],"summary":"Search commentary exposition text","description":"Full-text search across commentary exposition; each hit returns its reference, source, and a short excerpt around the match. Use /commentary/{reference} for the full passage commentary.","parameters":[{"name":"q","in":"query","description":"Search term (required, min 3 chars).","schema":{"type":"string"},"example":"grace"},{"name":"source","in":"query","description":"Restrict to one commentary source (optional).","schema":{"type":"string"},"example":"HENRY_FULL"},{"name":"page","in":"query","description":"Page number (default 1).","schema":{"type":"integer","default":1},"example":1},{"name":"limit","in":"query","description":"Results per page (1–50, default 20).","schema":{"type":"integer","default":20,"minimum":1,"maximum":50},"example":20}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Invalid request (bad reference, param, or range).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/commentary?q=grace' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/commentary/{reference}":{"get":{"tags":["Study"],"summary":"Public-domain commentary for a verse, range, or chapter","description":"Returns commentary covering the passage as structured `paragraphs` (plus a joined `text`). Currently the source is Matthew Henry's Complete Commentary (`HENRY_FULL`); more public-domain sources are planned, and `source`/`tradition` filters are already supported.\n\nMatthew Henry is written over verse *ranges*, so for a single-verse request the response is **narrowed to that verse** using his inline verse anchors (each entry then carries `view: \"verse\"`, `scopedToVerse`, `coveredVerses`, and the verse's `scripture`). Pass `scope=full` for the complete exposition of the whole range. `format=summary` returns a short excerpt instead of full text.","parameters":[{"name":"reference","in":"path","required":true,"description":"URL-encoded reference (slug or display name).","schema":{"type":"string"},"example":"John%203:16"},{"name":"scope","in":"query","description":"`verse` (default for a single-verse request — narrow to that verse) or `full` (the entire range entry).","schema":{"type":"string","enum":["verse","full"],"default":"verse"},"example":"verse"},{"name":"source","in":"query","description":"Comma-separated source codes (e.g. `HENRY_FULL`).","schema":{"type":"string"},"example":"HENRY_FULL"},{"name":"tradition","in":"query","description":"Filter by tradition.","schema":{"type":"string","enum":["reformed","wesleyan","baptist","anglican","lutheran","catholic"]},"example":"reformed"},{"name":"format","in":"query","description":"`full` (default) or `summary` (first ~250 chars per entry).","schema":{"type":"string","enum":["full","summary"],"default":"full"},"example":"summary"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Invalid request (bad reference, param, or range).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/commentary/John%203:16' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/crossrefs/{reference}":{"get":{"tags":["Study"],"summary":"Treasury of Scripture Knowledge cross-references","description":"Returns referenced verses in canonical order for a single verse. Pass `include=text` to embed each referenced verse's text (in `translation`, default KJV) so you don't need a follow-up request per reference.","parameters":[{"name":"reference","in":"path","required":true,"description":"URL-encoded single-verse reference.","schema":{"type":"string"},"example":"John%203:16"},{"name":"include","in":"query","description":"Set to `text` to embed each referenced verse's text.","schema":{"type":"string","enum":["text"]},"example":"text"},{"name":"translation","in":"query","description":"Translation for included text (default KJV).","schema":{"type":"string","enum":["WEB","KJV","KJVA","AKJV"],"default":"KJV"},"example":"KJV"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Invalid request (bad reference, param, or range).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/crossrefs/John%203:16?include=text' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/strongs/{number}":{"get":{"tags":["Study"],"summary":"Strong's lexicon entry","description":"Original word, transliteration, definition, and KJV usage. Covers H1–H8674 and G1–G5624.","parameters":[{"name":"number","in":"path","required":true,"description":"Strong's number, e.g. `G2316` or `H430`.","schema":{"type":"string"},"example":"G2316"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Invalid request (bad reference, param, or range).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/strongs/G2316' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/dictionary":{"get":{"tags":["Study"],"summary":"Search Bible dictionary entries","description":"Easton's + Smith's combined. Requires `q`.","parameters":[{"name":"q","in":"query","description":"Search term (required).","schema":{"type":"string"},"example":"grace"},{"name":"source","in":"query","description":"Restrict to a source: `EAS` (Easton's) or `SMI` (Smith's).","schema":{"type":"string","enum":["EAS","SMI"]},"example":"EAS"},{"name":"page","in":"query","description":"Page number (default 1).","schema":{"type":"integer","default":1},"example":1},{"name":"limit","in":"query","description":"Results per page (1–50, default 20).","schema":{"type":"integer","default":20,"minimum":1,"maximum":50},"example":20}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Invalid request (bad reference, param, or range).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/dictionary?q=grace' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/dictionary/{slug}":{"get":{"tags":["Study"],"summary":"Single dictionary entry","parameters":[{"name":"slug","in":"path","required":true,"description":"Entry slug.","schema":{"type":"string"},"example":"grace"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/dictionary/grace' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/concordance/{topic}":{"get":{"tags":["Study"],"summary":"Concordance topic lookup","parameters":[{"name":"topic","in":"path","required":true,"description":"Topic slug, or use `search` with `?q=`.","schema":{"type":"string"},"example":"love"},{"name":"q","in":"query","description":"When topic is `search`, the query string.","schema":{"type":"string"},"example":"love"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Invalid request (bad reference, param, or range).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/concordance/love' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/topics":{"get":{"tags":["Topics"],"summary":"List topical-index entries (paginated)","description":"1,900+ topics. Paginate with `page`/`perPage`; the `pagination` block reports `total` and `totalPages`.","parameters":[{"name":"q","in":"query","description":"Search topic titles.","schema":{"type":"string"},"example":"faith"},{"name":"page","in":"query","description":"Page number (default 1).","schema":{"type":"integer","default":1},"example":2},{"name":"perPage","in":"query","description":"Items per page (1–200, default 100).","schema":{"type":"integer","default":100,"minimum":1,"maximum":200},"example":200}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/topics?page=2&perPage=200' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/topics/{slug}":{"get":{"tags":["Topics"],"summary":"Verses for a topic","parameters":[{"name":"slug","in":"path","required":true,"description":"Topic slug.","schema":{"type":"string"},"example":"love"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/topics/love' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/people":{"get":{"tags":["People, Places & Things"],"summary":"List/search biblical people (paginated)","parameters":[{"name":"search","in":"query","description":"Search names.","schema":{"type":"string"},"example":"moses"},{"name":"tribe","in":"query","description":"Filter by tribe.","schema":{"type":"string"},"example":"judah"},{"name":"occupation","in":"query","description":"Filter by occupation.","schema":{"type":"string"},"example":"king"},{"name":"era","in":"query","description":"Filter by era.","schema":{"type":"string"},"example":"New Testament"},{"name":"gender","in":"query","description":"Filter by gender.","schema":{"type":"string"},"example":"male"},{"name":"limit","in":"query","description":"Page size (max 100, default 50).","schema":{"type":"integer","default":50,"maximum":100},"example":50},{"name":"page","in":"query","description":"Page number (default 1).","schema":{"type":"integer","default":1},"example":1}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/people?search=moses' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/people/{slug}":{"get":{"tags":["People, Places & Things"],"summary":"Person detail","parameters":[{"name":"slug","in":"path","required":true,"description":"Person slug.","schema":{"type":"string"},"example":"moses"},{"name":"preview","in":"query","description":"Set `1` for a lightweight preview payload.","schema":{"type":"string"},"example":"1"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/people/moses' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/people/{slug}/family":{"get":{"tags":["People, Places & Things"],"summary":"A person's family relationships","parameters":[{"name":"slug","in":"path","required":true,"description":"Person slug.","schema":{"type":"string"},"example":"david"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/people/david/family' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/people/{slug}/interactions":{"get":{"tags":["People, Places & Things"],"summary":"Other people who appear in the same verses","parameters":[{"name":"slug","in":"path","required":true,"description":"Person slug.","schema":{"type":"string"},"example":"david"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/people/david/interactions' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/people/{slug}/places":{"get":{"tags":["People, Places & Things"],"summary":"Places associated with a person","parameters":[{"name":"slug","in":"path","required":true,"description":"Person slug.","schema":{"type":"string"},"example":"david"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/people/david/places' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/people/{slug}/timeline":{"get":{"tags":["People, Places & Things"],"summary":"A person's timeline events","parameters":[{"name":"slug","in":"path","required":true,"description":"Person slug.","schema":{"type":"string"},"example":"david"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/people/david/timeline' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/places/{slug}":{"get":{"tags":["People, Places & Things"],"summary":"Place detail","parameters":[{"name":"slug","in":"path","required":true,"description":"Place slug.","schema":{"type":"string"},"example":"jerusalem"},{"name":"preview","in":"query","description":"Set `1` for a lightweight preview payload.","schema":{"type":"string"},"example":"1"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/places/jerusalem' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/things/{slug}":{"get":{"tags":["People, Places & Things"],"summary":"Thing (object/artifact) detail","parameters":[{"name":"slug","in":"path","required":true,"description":"Thing slug.","schema":{"type":"string"},"example":"ark-of-the-covenant"},{"name":"preview","in":"query","description":"Set `1` for a lightweight preview payload.","schema":{"type":"string"},"example":"1"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/things/ark-of-the-covenant' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/passages/{reference}/people":{"get":{"tags":["People, Places & Things"],"summary":"People mentioned in a passage","parameters":[{"name":"reference","in":"path","required":true,"description":"URL-encoded reference.","schema":{"type":"string"},"example":"Genesis%201"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Invalid request (bad reference, param, or range).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/passages/Genesis%201/people' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/passages/{reference}/places":{"get":{"tags":["People, Places & Things"],"summary":"Places mentioned in a passage","parameters":[{"name":"reference","in":"path","required":true,"description":"URL-encoded reference.","schema":{"type":"string"},"example":"Genesis%201"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Invalid request (bad reference, param, or range).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/passages/Genesis%201/places' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/search":{"get":{"tags":["Search"],"summary":"Search Scripture or an entity type","description":"Default searches verse text via Postgres full-text search (websearch syntax: `\"exact phrase\"`, `word OR word`, `-excluded`). Set `type` to search people/places/things/dictionary/topics instead. Verse mode can filter by `book` (one or a comma list), `testament`, and `section`, normalize a natural-language question with `mode=natural`, and mark matches with `highlight=true`.","parameters":[{"name":"q","in":"query","description":"Search query (required, min 2 chars).","schema":{"type":"string"},"example":"tithing"},{"name":"type","in":"query","description":"What to search.","schema":{"type":"string","enum":["verses","people","places","things","dictionary","topics"],"default":"verses"},"example":"verses"},{"name":"mode","in":"query","description":"`natural` strips stopwords + ORs the terms so a question returns hits (verse mode).","schema":{"type":"string","enum":["exact","natural"],"default":"exact"},"example":"natural"},{"name":"translation","in":"query","description":"Translation to search (default WEB).","schema":{"type":"string","enum":["WEB","KJV","KJVA","AKJV"],"default":"WEB"},"example":"WEB"},{"name":"book","in":"query","description":"Restrict to one book slug or a comma list.","schema":{"type":"string"},"example":"john,romans"},{"name":"testament","in":"query","description":"Restrict by testament (verse mode).","schema":{"type":"string","enum":["OT","NT"]},"example":"NT"},{"name":"section","in":"query","description":"Restrict by canon section (verse mode).","schema":{"type":"string","enum":["law","history","wisdom","prophets","gospels","epistles"]},"example":"gospels"},{"name":"highlight","in":"query","description":"Wrap matched terms in <mark> in the verse text.","schema":{"type":"boolean","default":false},"example":true},{"name":"page","in":"query","description":"Page number (default 1).","schema":{"type":"integer","default":1},"example":1},{"name":"limit","in":"query","description":"Results per page (1–50, default 20).","schema":{"type":"integer","default":20,"minimum":1,"maximum":50},"example":20}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Invalid request (bad reference, param, or range).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/search?q=what%20does%20the%20bible%20say%20about%20tithing&mode=natural' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/search/all":{"get":{"tags":["Search"],"summary":"Unified search across all types (one request)","description":"Searches multiple types at once and groups results by type with a per-type count — replaces the client-side fan-out of separate /search, /people, /places, /things, /dictionary, /topics calls.","parameters":[{"name":"q","in":"query","description":"Search query (required, min 2 chars).","schema":{"type":"string"},"example":"love"},{"name":"types","in":"query","description":"Comma list of types to include (default all).","schema":{"type":"string"},"example":"verses,people,places,things,dictionary,topics"},{"name":"limit","in":"query","description":"Items per type (1–20, default 5).","schema":{"type":"integer","default":5,"minimum":1,"maximum":20},"example":5},{"name":"translation","in":"query","description":"Translation for the verses group (default WEB).","schema":{"type":"string","enum":["WEB","KJV","KJVA","AKJV"],"default":"WEB"},"example":"WEB"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Invalid request (bad reference, param, or range).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/search/all?q=love&limit=5' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/search/semantic":{"get":{"tags":["Search"],"summary":"Semantic (meaning-based) verse search","description":"Ranks verses by semantic similarity to a natural-language query using embeddings + a pgvector cosine index — finds passages by meaning, not just shared words. Each hit includes a `similarity` score (0–1). If embeddings aren't populated yet it transparently falls back to natural-language full-text search (`meta.mode` reports which ran).","parameters":[{"name":"q","in":"query","description":"Natural-language query (required, min 2 chars).","schema":{"type":"string"},"example":"how should I handle anxiety and worry"},{"name":"limit","in":"query","description":"Results (1–50, default 20).","schema":{"type":"integer","default":20,"minimum":1,"maximum":50},"example":20}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Invalid request (bad reference, param, or range).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/search/semantic?q=how%20should%20I%20handle%20anxiety' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/places":{"get":{"tags":["Places"],"summary":"List / search places","description":"Paginated list of biblical places; pass `q` to search by name. Use /places/{slug} for the full record.","parameters":[{"name":"q","in":"query","description":"Search by name (optional).","schema":{"type":"string"},"example":"jordan"},{"name":"page","in":"query","description":"Page number (default 1).","schema":{"type":"integer","default":1},"example":1},{"name":"limit","in":"query","description":"Results per page (1–100, default 20).","schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"example":20}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/places?q=jordan' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/things":{"get":{"tags":["Things"],"summary":"List / search things","description":"Paginated list of biblical objects & artifacts; pass `q` to search by name. Use /things/{slug} for the full record.","parameters":[{"name":"q","in":"query","description":"Search by name (optional).","schema":{"type":"string"},"example":"ark"},{"name":"page","in":"query","description":"Page number (default 1).","schema":{"type":"integer","default":1},"example":1},{"name":"limit","in":"query","description":"Results per page (1–100, default 20).","schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"example":20}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/things?q=ark' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/strongs":{"get":{"tags":["Lexicon"],"summary":"Search Strong's by word","description":"Look up lexicon entries by an English word, transliteration, original lemma, or the number itself. (Use /strongs/{number} for a single entry.)","parameters":[{"name":"q","in":"query","description":"Search term (required, min 2 chars).","schema":{"type":"string"},"example":"love"},{"name":"page","in":"query","description":"Page number (default 1).","schema":{"type":"integer","default":1},"example":1},{"name":"limit","in":"query","description":"Results per page (1–50, default 20).","schema":{"type":"integer","default":20,"minimum":1,"maximum":50},"example":20}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"400":{"description":"Invalid request (bad reference, param, or range).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/strongs?q=love' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/books/{book}/download":{"get":{"tags":["Scripture"],"summary":"Download an entire book in one request","description":"Returns every chapter + verse of a book, so an offline copy of a translation is ~66 requests (one per book) instead of ~1,189 chapter requests. Immutable — cached aggressively.","parameters":[{"name":"book","in":"path","required":true,"description":"Book slug.","schema":{"type":"string"},"example":"john"},{"name":"translation","in":"query","description":"Translation (default WEB).","schema":{"type":"string","enum":["WEB","KJV","KJVA","AKJV"],"default":"WEB"},"example":"WEB"},{"name":"format","in":"query","description":"`json` (chapters→verses) or `text`.","schema":{"type":"string","enum":["json","text"],"default":"json"},"example":"json"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/books/john/download?translation=KJV' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/download/manifest":{"get":{"tags":["Scripture"],"summary":"Offline-sync catalog of downloadable bundles","description":"Lists every pre-built bundle (whole-translation + per-book) with `url`, `bytes`, `sha256`, and `version`. Build an offline app by fetching this, downloading each bundle's `url` (public, CDN-served, immutable, gzipped) once, storing it on-device, then re-fetching this manifest periodically and re-downloading only bundles whose `version` changed. Short-cached + ETag'd. (If no bundles are uploaded yet, returns an empty list — use `/download/{translation}` meanwhile.)","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/download/manifest' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/download/{translation}":{"get":{"tags":["Scripture"],"summary":"Download an ENTIRE translation in one request","description":"The whole Bible in a single request, compact format (verses are bare arrays indexed by verse number). ~4.1 MB raw / ~1.2 MB gzipped for WEB. Returns an `ETag` — send it back as `If-None-Match` to get a 304 instead of re-downloading. Shape: `{ translation, name, books: [ { slug, name, chapters: [ [\"v1\",\"v2\",…], … ] } ] }`.","parameters":[{"name":"translation","in":"path","required":true,"description":"Translation abbreviation.","schema":{"type":"string"},"example":"WEB"},{"name":"format","in":"query","description":"`json` (compact) or `text`.","schema":{"type":"string","enum":["json","text"],"default":"json"},"example":"json"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/download/WEB' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/verse-of-the-day":{"get":{"tags":["Daily"],"summary":"Today's Verse of the Day","description":"A verse pinned to today wins; otherwise the active pool cycles by day-of-year. Pass `pool=true` for the full pool.","parameters":[{"name":"pool","in":"query","description":"Set `true` to also return the full active verse pool.","schema":{"type":"boolean"},"example":true}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/verse-of-the-day' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/character-of-the-day":{"get":{"tags":["Daily"],"summary":"Today's Character of the Day","description":"A scheduled person for today wins; otherwise a stable day-of-year rotation over the roster. Links to the full record via `/api/v1/people/{slug}`. (`/api/v1/person-of-the-day` is an alias.)","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/character-of-the-day' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/person-of-the-day":{"get":{"tags":["Daily"],"summary":"Today's Person of the Day (alias of character-of-the-day)","description":"Identical to `/api/v1/character-of-the-day` — both names resolve to the same handler.","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/person-of-the-day' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}},"/api/v1/embed/index":{"get":{"tags":["Widget"],"summary":"Detection dictionary for the embeddable widget","description":"Book + entity names with mention counts; downloaded once by the tooltip widget.","parameters":[{"name":"min","in":"query","description":"Minimum mention count to include.","schema":{"type":"integer","default":0},"example":0}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (per-minute or per-window quota).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl 'https://myselahh.com/api/v1/embed/index' \\\n  -H 'Authorization: Bearer $BIBLE_API_KEY'"}]}}},"components":{"securitySchemes":{"bearerKey":{"type":"http","scheme":"bearer","description":"Send your API key as `Authorization: Bearer <key>`."},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Send your API key in the `X-API-Key` header."},"apiKeyQuery":{"type":"apiKey","in":"query","name":"key","description":"Send your API key as `?key=<key>` (least preferred — appears in logs)."}},"schemas":{"SuccessEnvelope":{"type":"object","required":["data","meta"],"properties":{"data":{"description":"The payload — object or array, shape varies per endpoint."},"meta":{"type":"object","description":"Request echo + context (reference, translation, counts, …).","additionalProperties":true},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"Pagination":{"type":"object","properties":{"total":{"type":"integer"},"page":{"type":"integer"},"perPage":{"type":"integer"},"totalPages":{"type":"integer"}}},"ErrorEnvelope":{"type":"object","required":["data","meta","errors"],"properties":{"data":{"type":"null"},"meta":{"type":"object","additionalProperties":true},"errors":{"type":"array","items":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"INVALID_REFERENCE"},"message":{"type":"string"},"docs":{"type":"string","format":"uri"}}}}}}}}}