{
  "info": {
    "name": "Bible Verse API",
    "description": "Bible verses for any app: fetch Bible text by translation, book, chapter and verse, using references the way people type them (`jn 3:16-18`, `1 Cor 13 4-7`, `Psalm 23; Rom 8:28`).\n\n## Get started\n1. Get an API key at https://bibleverse-api.com.\n2. Pick the **Bible Verse API** environment (top right) and paste your key into its `apiKey` value.\n3. Open **Passages → Get a verse range** and press **Send**.\n\n## Keys\nSend your key as `Authorization: Bearer <key>` (this collection does it for you).\n- **Secret keys** (`bva_sk_…`) are for servers and are refused from browsers.\n- **Publishable keys** (`bva_pk_…`) are for websites and only work from the websites listed on the key.\n\n## Limits\n| | Free | Starter | Pro | Business |\n|---|---|---|---|---|\n| Requests | 5,000 / day | 100,000 / month | 1,000,000 / month | 10,000,000 / month |\n| Verses returned | 2,000 / day | 300,000 / month | 3,000,000 / month | 30,000,000 / month |\n| Verses per request | 200 | 500 | 1,000 | 2,000 |\n| Requests per minute | 60 | 300 | 1,200 | 3,000 |\n\nResponses carry `RateLimit-Remaining` and, with Bible text, `Verses-Remaining`. At a limit the API answers `429` with `Retry-After`.\n\n## Errors\nAlways `{ \"error\": { \"code\": \"…\", \"message\": \"…\" } }`: `code` is stable for programs, `message` says what to fix. See the **Errors** folder.\n\n## Attribution\nEvery passage includes `attribution`. Show it wherever you display the text.\n\nFull API description (OpenAPI): {{baseUrl}}/v1/openapi.json",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiKey}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.bibleverse-api.com"
    },
    {
      "key": "bibleId",
      "value": "kjv"
    }
  ],
  "item": [
    {
      "name": "Passages",
      "description": "Bible text. References are read the way people type them; typos get a suggestion.",
      "item": [
        {
          "name": "Get a verse range",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"answers 200\", () => pm.response.to.have.status(200));",
                  "pm.test(\"includes the attribution\", () => pm.expect(pm.response.json().attribution).to.be.a(\"string\").and.not.empty);",
                  "pm.test(\"shows verses left\", () => pm.response.to.have.header(\"Verses-Remaining\"));"
                ]
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/bibles/{{bibleId}}/passages?ref=John 3:16-17",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "bibles",
                "{{bibleId}}",
                "passages"
              ],
              "query": [
                {
                  "key": "ref",
                  "value": "John 3:16-17"
                }
              ]
            },
            "description": "Any reference: a verse, a range, several passages separated by `;`, a whole chapter or book."
          },
          "response": [
            {
              "name": "Example",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/bibles/{{bibleId}}/passages?ref=John 3:16-17",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "bibles",
                    "{{bibleId}}",
                    "passages"
                  ],
                  "query": [
                    {
                      "key": "ref",
                      "value": "John 3:16-17"
                    }
                  ]
                },
                "description": "Any reference: a verse, a range, several passages separated by `;`, a whole chapter or book."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "content-type",
                  "value": "application/json"
                },
                {
                  "key": "ratelimit-limit",
                  "value": "5000"
                },
                {
                  "key": "ratelimit-remaining",
                  "value": "4998"
                },
                {
                  "key": "ratelimit-reset",
                  "value": "76234"
                },
                {
                  "key": "verses-limit",
                  "value": "2000"
                },
                {
                  "key": "verses-remaining",
                  "value": "1997"
                }
              ],
              "body": "{\n  \"bible\": {\n    \"id\": \"kjv\",\n    \"name\": \"King James Version (sample)\",\n    \"abbreviation\": \"KJV\",\n    \"language\": \"en\"\n  },\n  \"reference\": \"John 3:16–17\",\n  \"passages\": [\n    {\n      \"reference\": \"John 3:16–17\",\n      \"book\": \"JHN\",\n      \"bookName\": \"John\",\n      \"chapters\": [\n        {\n          \"chapter\": 3,\n          \"verses\": [\n            {\n              \"verse\": 16,\n              \"text\": \"For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.\"\n            },\n            {\n              \"verse\": 17,\n              \"text\": \"For God sent not his Son into the world to condemn the world; but that the world through him might be saved.\"\n            }\n          ]\n        }\n      ]\n    }\n  ],\n  \"attribution\": \"King James Version (public domain)\"\n}"
            }
          ]
        },
        {
          "name": "Get several passages",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"answers 200\", () => pm.response.to.have.status(200));",
                  "pm.test(\"includes the attribution\", () => pm.expect(pm.response.json().attribution).to.be.a(\"string\").and.not.empty);",
                  "pm.test(\"shows verses left\", () => pm.response.to.have.header(\"Verses-Remaining\"));"
                ]
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/bibles/{{bibleId}}/passages?ref=Psalm 23:1; John 3:16",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "bibles",
                "{{bibleId}}",
                "passages"
              ],
              "query": [
                {
                  "key": "ref",
                  "value": "Psalm 23:1; John 3:16"
                }
              ]
            },
            "description": "Separate passages with `;`. A passage without a book uses the previous one: `John 3:16; 4:1`."
          },
          "response": [
            {
              "name": "Example",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/bibles/{{bibleId}}/passages?ref=Psalm 23:1; John 3:16",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "bibles",
                    "{{bibleId}}",
                    "passages"
                  ],
                  "query": [
                    {
                      "key": "ref",
                      "value": "Psalm 23:1; John 3:16"
                    }
                  ]
                },
                "description": "Separate passages with `;`. A passage without a book uses the previous one: `John 3:16; 4:1`."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "content-type",
                  "value": "application/json"
                },
                {
                  "key": "ratelimit-limit",
                  "value": "5000"
                },
                {
                  "key": "ratelimit-remaining",
                  "value": "4997"
                },
                {
                  "key": "ratelimit-reset",
                  "value": "76234"
                },
                {
                  "key": "verses-limit",
                  "value": "2000"
                },
                {
                  "key": "verses-remaining",
                  "value": "1995"
                }
              ],
              "body": "{\n  \"bible\": {\n    \"id\": \"kjv\",\n    \"name\": \"King James Version (sample)\",\n    \"abbreviation\": \"KJV\",\n    \"language\": \"en\"\n  },\n  \"reference\": \"Psalms 23:1; John 3:16\",\n  \"passages\": [\n    {\n      \"reference\": \"Psalms 23:1\",\n      \"book\": \"PSA\",\n      \"bookName\": \"Psalms\",\n      \"chapters\": [\n        {\n          \"chapter\": 23,\n          \"verses\": [\n            {\n              \"verse\": 1,\n              \"text\": \"The LORD is my shepherd; I shall not want.\"\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"reference\": \"John 3:16\",\n      \"book\": \"JHN\",\n      \"bookName\": \"John\",\n      \"chapters\": [\n        {\n          \"chapter\": 3,\n          \"verses\": [\n            {\n              \"verse\": 16,\n              \"text\": \"For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.\"\n            }\n          ]\n        }\n      ]\n    }\n  ],\n  \"attribution\": \"King James Version (public domain)\"\n}"
            }
          ]
        },
        {
          "name": "Get a whole chapter",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"answers 200\", () => pm.response.to.have.status(200));",
                  "pm.test(\"includes the attribution\", () => pm.expect(pm.response.json().attribution).to.be.a(\"string\").and.not.empty);",
                  "pm.test(\"shows verses left\", () => pm.response.to.have.header(\"Verses-Remaining\"));"
                ]
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/bibles/{{bibleId}}/chapters/PSA.23",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "bibles",
                "{{bibleId}}",
                "chapters",
                "PSA.23"
              ]
            },
            "description": "`BOOK.chapter` with a USFM code or a book name: `JHN.3`, `psalm.23`, `1cor.13`."
          },
          "response": [
            {
              "name": "Example",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/bibles/{{bibleId}}/chapters/PSA.23",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "bibles",
                    "{{bibleId}}",
                    "chapters",
                    "PSA.23"
                  ]
                },
                "description": "`BOOK.chapter` with a USFM code or a book name: `JHN.3`, `psalm.23`, `1cor.13`."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "content-type",
                  "value": "application/json"
                },
                {
                  "key": "ratelimit-limit",
                  "value": "5000"
                },
                {
                  "key": "ratelimit-remaining",
                  "value": "4996"
                },
                {
                  "key": "ratelimit-reset",
                  "value": "76234"
                },
                {
                  "key": "verses-limit",
                  "value": "2000"
                },
                {
                  "key": "verses-remaining",
                  "value": "1989"
                }
              ],
              "body": "{\n  \"bible\": {\n    \"id\": \"kjv\",\n    \"name\": \"King James Version (sample)\",\n    \"abbreviation\": \"KJV\",\n    \"language\": \"en\"\n  },\n  \"reference\": \"Psalms 23\",\n  \"passages\": [\n    {\n      \"reference\": \"Psalms 23\",\n      \"book\": \"PSA\",\n      \"bookName\": \"Psalms\",\n      \"chapters\": [\n        {\n          \"chapter\": 23,\n          \"verses\": [\n            {\n              \"verse\": 1,\n              \"text\": \"The LORD is my shepherd; I shall not want.\"\n            },\n            {\n              \"verse\": 2,\n              \"text\": \"He maketh me to lie down in green pastures: he leadeth me beside the still waters.\"\n            },\n            {\n              \"verse\": 3,\n              \"text\": \"He restoreth my soul: he leadeth me in the paths of righteousness for his name's sake.\"\n            },\n            {\n              \"verse\": 4,\n              \"text\": \"Yea, though I walk through the valley of the shadow of death, I will fear no evil: for thou art with me; thy rod and thy staff they comfort me.\"\n            },\n            {\n              \"verse\": 5,\n              \"text\": \"Thou preparest a table before me in the presence of mine enemies: thou anointest my head with oil; my cup runneth over.\"\n            },\n            {\n              \"verse\": 6,\n              \"text\": \"Surely goodness and mercy shall follow me all the days of my life: and I will dwell in the house of the LORD for ever.\"\n            }\n          ]\n        }\n      ]\n    }\n  ],\n  \"attribution\": \"King James Version (public domain)\"\n}"
            }
          ]
        },
        {
          "name": "Get verses as plain text",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"answers 200\", () => pm.response.to.have.status(200));",
                  "pm.test(\"is plain text\", () => pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"text/plain\"));"
                ]
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/bibles/{{bibleId}}/passages?ref=Psalm 23&format=text",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "bibles",
                "{{bibleId}}",
                "passages"
              ],
              "query": [
                {
                  "key": "ref",
                  "value": "Psalm 23"
                },
                {
                  "key": "format",
                  "value": "text"
                }
              ]
            },
            "description": "`format=text` returns the reference, numbered verses and the attribution as plain text."
          },
          "response": [
            {
              "name": "Example",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/bibles/{{bibleId}}/passages?ref=Psalm 23&format=text",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "bibles",
                    "{{bibleId}}",
                    "passages"
                  ],
                  "query": [
                    {
                      "key": "ref",
                      "value": "Psalm 23"
                    },
                    {
                      "key": "format",
                      "value": "text"
                    }
                  ]
                },
                "description": "`format=text` returns the reference, numbered verses and the attribution as plain text."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "text",
              "header": [
                {
                  "key": "content-type",
                  "value": "text/plain; charset=UTF-8"
                },
                {
                  "key": "ratelimit-limit",
                  "value": "5000"
                },
                {
                  "key": "ratelimit-remaining",
                  "value": "4995"
                },
                {
                  "key": "ratelimit-reset",
                  "value": "76233"
                },
                {
                  "key": "verses-limit",
                  "value": "2000"
                },
                {
                  "key": "verses-remaining",
                  "value": "1983"
                }
              ],
              "body": "Psalms 23\n1 The LORD is my shepherd; I shall not want.\n2 He maketh me to lie down in green pastures: he leadeth me beside the still waters.\n3 He restoreth my soul: he leadeth me in the paths of righteousness for his name's sake.\n4 Yea, though I walk through the valley of the shadow of death, I will fear no evil: for thou art with me; thy rod and thy staff they comfort me.\n5 Thou preparest a table before me in the presence of mine enemies: thou anointest my head with oil; my cup runneth over.\n6 Surely goodness and mercy shall follow me all the days of my life: and I will dwell in the house of the LORD for ever.\n\nKing James Version (public domain)\n"
            }
          ]
        }
      ]
    },
    {
      "name": "Bibles",
      "description": "Translations your plan can use, and their books.",
      "item": [
        {
          "name": "List translations",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"answers 200\", () => pm.response.to.have.status(200));",
                  "pm.test(\"lists translations\", () => pm.expect(pm.response.json().bibles).to.be.an(\"array\"));"
                ]
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/bibles",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "bibles"
              ]
            }
          },
          "response": [
            {
              "name": "Example",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/bibles",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "bibles"
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "content-type",
                  "value": "application/json"
                },
                {
                  "key": "ratelimit-limit",
                  "value": "5000"
                },
                {
                  "key": "ratelimit-remaining",
                  "value": "4994"
                },
                {
                  "key": "ratelimit-reset",
                  "value": "76233"
                }
              ],
              "body": "{\n  \"bibles\": [\n    {\n      \"id\": \"kjv\",\n      \"name\": \"King James Version (sample)\",\n      \"abbreviation\": \"KJV\",\n      \"language\": \"en\",\n      \"license\": \"public-domain\",\n      \"attribution\": \"King James Version (public domain)\",\n      \"source\": \"Development sample: a few passages for local testing. Replace with a full import before launch.\",\n      \"minPlan\": \"free\"\n    }\n  ]\n}"
            }
          ]
        },
        {
          "name": "Get a translation",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"answers 200\", () => pm.response.to.have.status(200));",
                  "pm.test(\"has books\", () => pm.expect(pm.response.json().bible.books).to.be.an(\"array\"));"
                ]
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/bibles/{{bibleId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "bibles",
                "{{bibleId}}"
              ]
            }
          },
          "response": [
            {
              "name": "Example",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/bibles/{{bibleId}}",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "bibles",
                    "{{bibleId}}"
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "content-type",
                  "value": "application/json"
                },
                {
                  "key": "ratelimit-limit",
                  "value": "5000"
                },
                {
                  "key": "ratelimit-remaining",
                  "value": "4993"
                },
                {
                  "key": "ratelimit-reset",
                  "value": "76233"
                }
              ],
              "body": "{\n  \"bible\": {\n    \"id\": \"kjv\",\n    \"name\": \"King James Version (sample)\",\n    \"abbreviation\": \"KJV\",\n    \"language\": \"en\",\n    \"license\": \"public-domain\",\n    \"attribution\": \"King James Version (public domain)\",\n    \"source\": \"Development sample: a few passages for local testing. Replace with a full import before launch.\",\n    \"minPlan\": \"free\",\n    \"books\": [\n      {\n        \"code\": \"GEN\",\n        \"name\": \"Genesis\",\n        \"chapters\": 1\n      },\n      {\n        \"code\": \"PSA\",\n        \"name\": \"Psalms\",\n        \"chapters\": 23\n      },\n      {\n        \"code\": \"JHN\",\n        \"name\": \"John\",\n        \"chapters\": 3\n      },\n      {\n        \"code\": \"JUD\",\n        \"name\": \"Jude\",\n        \"chapters\": 1\n      }\n    ]\n  }\n}"
            }
          ]
        },
        {
          "name": "List books and verse counts",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"answers 200\", () => pm.response.to.have.status(200));"
                ]
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/bibles/{{bibleId}}/books",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "bibles",
                "{{bibleId}}",
                "books"
              ]
            },
            "description": "Books in Bible order, with the number of verses in every chapter."
          },
          "response": [
            {
              "name": "Example",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/bibles/{{bibleId}}/books",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "bibles",
                    "{{bibleId}}",
                    "books"
                  ]
                },
                "description": "Books in Bible order, with the number of verses in every chapter."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "content-type",
                  "value": "application/json"
                },
                {
                  "key": "ratelimit-limit",
                  "value": "5000"
                },
                {
                  "key": "ratelimit-remaining",
                  "value": "4992"
                },
                {
                  "key": "ratelimit-reset",
                  "value": "76232"
                }
              ],
              "body": "{\n  \"bible\": \"kjv\",\n  \"books\": [\n    {\n      \"code\": \"GEN\",\n      \"name\": \"Genesis\",\n      \"testament\": \"OT\",\n      \"chapters\": [\n        {\n          \"chapter\": 1,\n          \"verses\": 3\n        }\n      ]\n    },\n    {\n      \"code\": \"PSA\",\n      \"name\": \"Psalms\",\n      \"testament\": \"OT\",\n      \"chapters\": [\n        {\n          \"chapter\": 1,\n          \"verses\": 0\n        },\n        {\n          \"chapter\": 2,\n          \"verses\": 0\n        },\n        {\n          \"chapter\": 3,\n          \"verses\": 0\n        },\n        {\n          \"chapter\": 4,\n          \"verses\": 0\n        },\n        {\n          \"chapter\": 5,\n          \"verses\": 0\n        },\n        {\n          \"chapter\": 6,\n          \"verses\": 0\n        },\n        {\n          \"chapter\": 7,\n          \"verses\": 0\n        },\n        {\n          \"chapter\": 8,\n          \"verses\": 0\n        },\n        {\n          \"chapter\": 9,\n          \"verses\": 0\n        },\n        {\n          \"chapter\": 10,\n          \"verses\": 0\n        },\n        {\n          \"chapter\": 11,\n          \"verses\": 0\n        },\n        {\n          \"chapter\": 12,\n          \"verses\": 0\n        },\n        {\n          \"chapter\": 13,\n          \"verses\": 0\n        },\n        {\n          \"chapter\": 14,\n          \"verses\": 0\n        },\n        {\n          \"chapter\": 15,\n          \"verses\": 0\n        },\n        {\n          \"chapter\": 16,\n          \"verses\": 0\n        },\n        {\n          \"chapter\": 17,\n          \"verses\": 0\n        },\n        {\n          \"chapter\": 18,\n          \"verses\": 0\n        },\n        {\n          \"chapter\": 19,\n          \"verses\": 0\n        },\n        {\n          \"chapter\": 20,\n          \"verses\": 0\n        },\n        {\n          \"chapter\": 21,\n          \"verses\": 0\n        },\n        {\n          \"chapter\": 22,\n          \"verses\": 0\n        },\n        {\n          \"chapter\": 23,\n          \"verses\": 6\n        }\n      ]\n    },\n    {\n      \"code\": \"JHN\",\n      \"name\": \"John\",\n      \"testament\": \"NT\",\n      \"chapters\": [\n        {\n          \"chapter\": 1,\n          \"verses\": 0\n        },\n        {\n          \"chapter\": 2,\n          \"verses\": 0\n        },\n        {\n          \"chapter\": 3,\n          \"verses\": 18\n        }\n      ]\n    },\n    {\n      \"code\": \"JUD\",\n      \"name\": \"Jude\",\n      \"testament\": \"NT\",\n      \"chapters\": [\n        {\n          \"chapter\": 1,\n          \"verses\": 2\n        }\n      ]\n    }\n  ]\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "References",
      "description": "Read typed references without fetching any text.",
      "item": [
        {
          "name": "Read a typed reference",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"answers 200\", () => pm.response.to.have.status(200));",
                  "pm.test(\"reads three references\", () => pm.expect(pm.response.json().references).to.have.length(3));"
                ]
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/parse?ref=Matt 25:31-33,46; Jude 3",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "parse"
              ],
              "query": [
                {
                  "key": "ref",
                  "value": "Matt 25:31-33,46; Jude 3"
                }
              ]
            },
            "description": "Turns typed text into exact references. In one-chapter books a bare number is a verse: `Jude 3` is Jude 1:3."
          },
          "response": [
            {
              "name": "Example",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/parse?ref=Matt 25:31-33,46; Jude 3",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "parse"
                  ],
                  "query": [
                    {
                      "key": "ref",
                      "value": "Matt 25:31-33,46; Jude 3"
                    }
                  ]
                },
                "description": "Turns typed text into exact references. In one-chapter books a bare number is a verse: `Jude 3` is Jude 1:3."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "content-type",
                  "value": "application/json"
                },
                {
                  "key": "ratelimit-limit",
                  "value": "5000"
                },
                {
                  "key": "ratelimit-remaining",
                  "value": "4991"
                },
                {
                  "key": "ratelimit-reset",
                  "value": "76232"
                }
              ],
              "body": "{\n  \"query\": \"Matt 25:31-33,46; Jude 3\",\n  \"references\": [\n    {\n      \"book\": \"MAT\",\n      \"start\": {\n        \"chapter\": 25,\n        \"verse\": 31\n      },\n      \"end\": {\n        \"chapter\": 25,\n        \"verse\": 33\n      },\n      \"reference\": \"Matthew 25:31–33\"\n    },\n    {\n      \"book\": \"MAT\",\n      \"start\": {\n        \"chapter\": 25,\n        \"verse\": 46\n      },\n      \"end\": {\n        \"chapter\": 25,\n        \"verse\": 46\n      },\n      \"reference\": \"Matthew 25:46\"\n    },\n    {\n      \"book\": \"JUD\",\n      \"start\": {\n        \"chapter\": 1,\n        \"verse\": 3\n      },\n      \"end\": {\n        \"chapter\": 1,\n        \"verse\": 3\n      },\n      \"reference\": \"Jude 1:3\"\n    }\n  ]\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "Errors",
      "description": "What the API answers when something's wrong. Each error has a stable `code` and a `message` that says what to fix.",
      "item": [
        {
          "name": "Typo in a book name",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"answers 400\", () => pm.response.to.have.status(400));",
                  "pm.test(\"error code is unknown_book\", () => pm.expect(pm.response.json().error.code).to.eql(\"unknown_book\"));"
                ]
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/bibles/{{bibleId}}/passages?ref=Jhon 3:16",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "bibles",
                "{{bibleId}}",
                "passages"
              ],
              "query": [
                {
                  "key": "ref",
                  "value": "Jhon 3:16"
                }
              ]
            }
          },
          "response": [
            {
              "name": "Example (400)",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/bibles/{{bibleId}}/passages?ref=Jhon 3:16",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "bibles",
                    "{{bibleId}}",
                    "passages"
                  ],
                  "query": [
                    {
                      "key": "ref",
                      "value": "Jhon 3:16"
                    }
                  ]
                }
              },
              "status": "Bad Request",
              "code": 400,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "content-type",
                  "value": "application/json"
                },
                {
                  "key": "ratelimit-limit",
                  "value": "5000"
                },
                {
                  "key": "ratelimit-remaining",
                  "value": "4990"
                },
                {
                  "key": "ratelimit-reset",
                  "value": "76232"
                }
              ],
              "body": "{\n  \"error\": {\n    \"code\": \"unknown_book\",\n    \"message\": \"No book called \\\"Jhon\\\". Did you mean John?\"\n  }\n}"
            }
          ]
        },
        {
          "name": "Verse that doesn't exist",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"answers 404\", () => pm.response.to.have.status(404));",
                  "pm.test(\"error code is verse_not_found\", () => pm.expect(pm.response.json().error.code).to.eql(\"verse_not_found\"));"
                ]
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/bibles/{{bibleId}}/passages?ref=John 3:99",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "bibles",
                "{{bibleId}}",
                "passages"
              ],
              "query": [
                {
                  "key": "ref",
                  "value": "John 3:99"
                }
              ]
            }
          },
          "response": [
            {
              "name": "Example (404)",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/bibles/{{bibleId}}/passages?ref=John 3:99",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "bibles",
                    "{{bibleId}}",
                    "passages"
                  ],
                  "query": [
                    {
                      "key": "ref",
                      "value": "John 3:99"
                    }
                  ]
                }
              },
              "status": "Not Found",
              "code": 404,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "content-type",
                  "value": "application/json"
                },
                {
                  "key": "ratelimit-limit",
                  "value": "5000"
                },
                {
                  "key": "ratelimit-remaining",
                  "value": "4989"
                },
                {
                  "key": "ratelimit-reset",
                  "value": "76231"
                }
              ],
              "body": "{\n  \"error\": {\n    \"code\": \"verse_not_found\",\n    \"message\": \"John 3 has 18 verses in KJV.\"\n  }\n}"
            }
          ]
        },
        {
          "name": "Unknown translation",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"answers 404\", () => pm.response.to.have.status(404));",
                  "pm.test(\"error code is unknown_bible\", () => pm.expect(pm.response.json().error.code).to.eql(\"unknown_bible\"));"
                ]
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/bibles/xyz/passages?ref=John 3:16",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "bibles",
                "xyz",
                "passages"
              ],
              "query": [
                {
                  "key": "ref",
                  "value": "John 3:16"
                }
              ]
            }
          },
          "response": [
            {
              "name": "Example (404)",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/bibles/xyz/passages?ref=John 3:16",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "bibles",
                    "xyz",
                    "passages"
                  ],
                  "query": [
                    {
                      "key": "ref",
                      "value": "John 3:16"
                    }
                  ]
                }
              },
              "status": "Not Found",
              "code": 404,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "content-type",
                  "value": "application/json"
                },
                {
                  "key": "ratelimit-limit",
                  "value": "5000"
                },
                {
                  "key": "ratelimit-remaining",
                  "value": "4988"
                },
                {
                  "key": "ratelimit-reset",
                  "value": "76231"
                }
              ],
              "body": "{\n  \"error\": {\n    \"code\": \"unknown_bible\",\n    \"message\": \"There's no Bible \\\"xyz\\\". GET /v1/bibles lists the ones you can use.\"\n  }\n}"
            }
          ]
        },
        {
          "name": "No API key",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"answers 401\", () => pm.response.to.have.status(401));",
                  "pm.test(\"error code is missing_api_key\", () => pm.expect(pm.response.json().error.code).to.eql(\"missing_api_key\"));"
                ]
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/bibles",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "bibles"
              ]
            },
            "auth": {
              "type": "noauth"
            }
          },
          "response": [
            {
              "name": "Example (401)",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/bibles",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "bibles"
                  ]
                },
                "auth": {
                  "type": "noauth"
                }
              },
              "status": "Unauthorized",
              "code": 401,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "content-type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": {\n    \"code\": \"missing_api_key\",\n    \"message\": \"Send your API key in the Authorization header: Authorization: Bearer <key>.\"\n  }\n}"
            }
          ]
        },
        {
          "name": "Secret key used from a website",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"answers 403\", () => pm.response.to.have.status(403));",
                  "pm.test(\"error code is secret_key_in_browser\", () => pm.expect(pm.response.json().error.code).to.eql(\"secret_key_in_browser\"));"
                ]
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Origin",
                "value": "https://example.org"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/bibles",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "bibles"
              ]
            },
            "description": "Secret keys (`bva_sk_…`) only work from servers. Websites use publishable keys (`bva_pk_…`)."
          },
          "response": [
            {
              "name": "Example (403)",
              "originalRequest": {
                "method": "GET",
                "header": [
                  {
                    "key": "Origin",
                    "value": "https://example.org"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/v1/bibles",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "bibles"
                  ]
                },
                "description": "Secret keys (`bva_sk_…`) only work from servers. Websites use publishable keys (`bva_pk_…`)."
              },
              "status": "Forbidden",
              "code": 403,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "content-type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": {\n    \"code\": \"secret_key_in_browser\",\n    \"message\": \"Secret keys only work from servers. Use a publishable key (bva_pk_) in websites and apps.\"\n  }\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "Service",
      "description": "Status and the API description. No key needed.",
      "item": [
        {
          "name": "Check the API is up",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"answers 200\", () => pm.response.to.have.status(200));"
                ]
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/health",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "health"
              ]
            },
            "auth": {
              "type": "noauth"
            }
          },
          "response": [
            {
              "name": "Example",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/health",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "health"
                  ]
                },
                "auth": {
                  "type": "noauth"
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "content-type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"ok\": true\n}"
            }
          ]
        },
        {
          "name": "Get the API description (OpenAPI)",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"answers 200\", () => pm.response.to.have.status(200));"
                ]
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/openapi.json",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "openapi.json"
              ]
            },
            "description": "Import this URL into Postman, Swagger or any OpenAPI tool.",
            "auth": {
              "type": "noauth"
            }
          },
          "response": [
            {
              "name": "Example",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/openapi.json",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "openapi.json"
                  ]
                },
                "description": "Import this URL into Postman, Swagger or any OpenAPI tool.",
                "auth": {
                  "type": "noauth"
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "content-type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"Bible Verse API\",\n    \"version\": \"1.0.0\"\n  },\n  \"…\": \"full document\"\n}"
            }
          ]
        }
      ]
    }
  ]
}
